%YAML 1.1
---
VERSION:         1.0.0.1

DEFINE:
  - INPUT:
      NAME:      book
      FILE:
        # change seghostname and file_path to reflect your 
        # runtime file location
        - seghostname:/file_path/whitepaper.txt

  - MAP:
      NAME:      wordsplit_python
      FUNCTION:  |
        for word in value.split():
          yield [word, 1]
      LANGUAGE:   python
      OPTIMIZE:   STRICT IMMUTABLE
      PARAMETERS: value text
      RETURNS:
        - key text
        - value integer
        
EXECUTE:
  - RUN:
      SOURCE:    book
      MAP:       wordsplit_python
      REDUCE:    SUM

